import request from "@/utils/request";
import type { ResponseType } from "@/utils/type";
import Login from "../pages/Login";
import { register } from "module";

const url = {
  login: "/login",
  info: "/user/info",
  user: "/user",
};

export const postLoginApi = (data: any) => {
  return request.post(url.login, data);
};

export const getUserInfoApi = (params: any) => {
  return request.get(url.info, {
    params,
  });
};

export const postUserApi = (data: any) => {
  return request.post(url.user, data);
};

export default {
  postLoginApi,
  getUserInfoApi,
  postUserApi,
};
